home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 10 / FM Towns Free Software Collection 10.iso / ms_dos / tool / et / et.bat next >
DOS Batch File  |  1995-02-20  |  811b  |  44 lines

  1. : et.bat type2 sample   by TEMITORAVIOS 95/02/09
  2. echo off
  3.     if /%1/ == // goto _help
  4.     if /%1/ == /?/ goto _help2
  5.     shift
  6.     goto %0
  7.  
  8. :_help
  9.     echo Usage: et cmd
  10.     sed -n -e "s/^:\(.*\):$/ \1/p" et.bat
  11.     goto _end
  12.  
  13. :_help2
  14.     if /%2/ == // goto _help
  15.     sed -n -e "/^:%2[ \t].*:$/{;s/^:\(.*\):$/ \1 /;:L;H;n;s/^:/ /;t L;x;p;q;}" et.bat
  16.     goto _end
  17.  
  18.  
  19. :doc            説明ファイル表示:
  20. :
  21. :        et.doc を表示します.
  22.  
  23.     type et.doc
  24.     goto _end
  25.  
  26. :type file [/p]        テキストを表示します。:
  27. :
  28. :        /p .. moreコマンドを利用し一画面ごとにポーズをかけます
  29. :
  30. :     役にたたない内容(^^;) あくまでサンプルですから.
  31.  
  32.         if /%1/ == //   goto type_er
  33.         if /%2/ == //p/ goto type_more
  34.         type %1
  35.         goto _end
  36.     :type_more
  37.         more < %1
  38.         goto _end
  39.     :type_er
  40.         echo.ファイル名を指定してください.
  41.         goto _end
  42.  
  43. :_end
  44.